package com.denlaku.longan.service;

import com.denlaku.longan.qo.DataSetQuery;
import com.denlaku.longan.qo.Query;
import com.denlaku.longan.vo.DataSet;
import com.denlaku.longan.vo.MetaData;

import java.util.List;

/**
 * @author tianx
 */
public interface DataSetService {
	int add(DataSet dataSet);

	int update(DataSet dataSet);

	int delete(Query query);

	List<DataSet> list(DataSetQuery query);

	DataSet get(Query query);

	DataSet getBase(Query query);
	
	void addCache(DataSet dataSet);

	void updateCache(DataSet dataSet);

	void deleteCache(Query query);

	DataSet getCache(Query query);

	List<MetaData> listMetaData(DataSet dataSet);

	/**
	 * 清理tag
	 *
	 * @param tenantId 租户ID
	 * @param tagId 标签ID
	 */
	void clearTag(Long tenantId, Long tagId);
}
